home *** CD-ROM | disk | FTP | other *** search
Wrap
EEEELLLLFFFF____SSSSTTTTRRRRPPPPTTTTRRRR((((3333EEEE)))) EEEELLLLFFFF____SSSSTTTTRRRRPPPPTTTTRRRR((((3333EEEE)))) NNNNAAAAMMMMEEEE _eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr - make a string pointer SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _cccc_cccc [_f_l_a_g ...] _f_i_l_e ... _----_llll_eeee_llll_ffff [_l_i_b_r_a_r_y ...] _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>> _cccc_hhhh_aaaa_rrrr _****_eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _ssss_eeee_cccc_tttt_iiii_oooo_nnnn_,,,, _ssss_iiii_zzzz_eeee______tttt _oooo_ffff_ffff_ssss_eeee_tttt_))))_;;;; _####_dddd_eeee_ffff_iiii_nnnn_eeee ______LLLL_IIII_BBBB_EEEE_LLLL_FFFF______XXXX_TTTT_NNNN_DDDD______6666_4444 _cccc_hhhh_aaaa_rrrr _****_eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _EEEE_llll_ffff_6666_4444______XXXX_wwww_oooo_rrrr_dddd _ssss_eeee_cccc_tttt_iiii_oooo_nnnn_,,,, _EEEE_llll_ffff_6666_4444______XXXX_wwww_oooo_rrrr_dddd _ssss_iiii_zzzz_eeee______tttt _oooo_ffff_ffff_ssss_eeee_tttt_))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN This function converts a string section _o_f_f_s_e_t to a string pointer. _e_l_f identifies the file in which the string section resides, and _s_e_c_t_i_o_n gives the section table index for the strings. _eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr normally returns a pointer to a string, but it returns a null pointer when _e_l_f is null, _s_e_c_t_i_o_n is invalid or is not a section of type _SSSS_HHHH_TTTT______SSSS_TTTT_RRRR_TTTT_AAAA_BBBB, the section data cannot be obtained, _o_f_f_s_e_t is invalid, or an error occurs. EEEEXXXXAAAAMMMMPPPPLLLLEEEE A prototype for retrieving section names appears below. The file header specifies the section name string table in the _eeee______ssss_hhhh_ssss_tttt_rrrr_nnnn_dddd_xxxx member. The following code loops through the sections, printing their names. _iiii_ffff _((((_((((_eeee_hhhh_dddd_rrrr _==== _eeee_llll_ffff_3333_2222______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr_((((_eeee_llll_ffff_))))_)))) _====_==== _0000_)))) _{{{{ _////_**** _hhhh_aaaa_nnnn_dddd_llll_eeee _tttt_hhhh_eeee _eeee_rrrr_rrrr_oooo_rrrr _****_//// _rrrr_eeee_tttt_uuuu_rrrr_nnnn_;;;; _}}}} _nnnn_dddd_xxxx _==== _eeee_hhhh_dddd_rrrr_----_>>>>_eeee______ssss_hhhh_ssss_tttt_rrrr_nnnn_dddd_xxxx_;;;; _ssss_cccc_nnnn _==== _0000_;;;; _wwww_hhhh_iiii_llll_eeee _((((_((((_ssss_cccc_nnnn _==== _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn_((((_eeee_llll_ffff_,,,, _ssss_cccc_nnnn_))))_)))) _!!!!_==== _0000_)))) _{{{{ _cccc_hhhh_aaaa_rrrr _****_nnnn_aaaa_mmmm_eeee _==== _0000_;;;; _iiii_ffff _((((_((((_ssss_hhhh_dddd_rrrr _==== _eeee_llll_ffff_3333_2222______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr_((((_ssss_cccc_nnnn_))))_)))) _!!!!_==== _0000_)))) _nnnn_aaaa_mmmm_eeee _==== _eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr_((((_eeee_llll_ffff_,,,, _nnnn_dddd_xxxx_,,,, _((((_ssss_iiii_zzzz_eeee______tttt_))))_ssss_hhhh_dddd_rrrr_----_>>>>_ssss_hhhh______nnnn_aaaa_mmmm_eeee_))))_;;;; _pppp_rrrr_iiii_nnnn_tttt_ffff_((((_""""_''''_%%%%_ssss_''''_\\\\_nnnn_""""_,,,, _nnnn_aaaa_mmmm_eeee_???? _nnnn_aaaa_mmmm_eeee_:::: _""""_((((_nnnn_uuuu_llll_llll_))))_""""_))))_;;;; _}}}} SSSSEEEEEEEE AAAALLLLSSSSOOOO _eeee_llll_ffff(3E), _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E), _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr(3E), _eeee_llll_ffff______xxxx_llll_aaaa_tttt_eeee(3E). NNNNOOOOTTTTEEEE A program may call _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa to retrieve an entire string table section. For some applications, that would be both more efficient and more convenient than using _eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr. The use of a _ssss_iiii_zzzz_eeee______tttt in a 32-bit compile with _eeee_llll_ffff______ssss_tttt_rrrr_pppp_tttt_rrrr is unfortunate, since that makes it impossible to deal with certain object files. If, when the 32-bit app is compiled, _LIBELF_XTND_64 _iiii_ssss _dddd_eeee_ffff_iiii_nnnn_eeee_dddd_,,,, _tttt_hhhh_eeee_nnnn _tttt_hhhh_eeee _ffff_uuuu_nnnn_cccc_tttt_iiii_oooo_nnnn _iiii_nnnn_tttt_eeee_rrrr_ffff_aaaa_cccc_eeee _cccc_hhhh_aaaa_nnnn_gggg_eeee_ssss _tttt_oooo _hhhh_aaaa_vvvv_eeee _6666_4444_----_bbbb_iiii_tttt _ffff_iiii_eeee_llll_dddd_ssss_.... _IIII_ffff ______LLLL_IIII_BBBB_EEEE_LLLL_FFFF______XXXX_TTTT_NNNN_DDDD______6666_4444 is PPPPaaaaggggeeee 1111 EEEELLLLFFFF____SSSSTTTTRRRRPPPPTTTTRRRR((((3333EEEE)))) EEEELLLLFFFF____SSSSTTTTRRRRPPPPTTTTRRRR((((3333EEEE)))) defined at compile-time, then instead of linking with _----_llll_eeee_llll_ffff, link with -lelf_xtnd_.... _TTTT_hhhh_eeee_rrrr_eeee _iiii_ssss _aaaa _cccc_oooo_rrrr_rrrr_eeee_ssss_pppp_oooo_nnnn_dddd_iiii_nnnn_gggg _----_llll_dddd_wwww_aaaa_rrrr_ffff______xxxx_tttt_nnnn_dddd. It is essential that a 32-bit application compiled with _LIBELF_XTND_64 _bbbb_eeee _****_eeee_nnnn_tttt_iiii_rrrr_eeee_llll_yyyy_**** _cccc_oooo_mmmm_pppp_iiii_llll_eeee_dddd _wwww_iiii_tttt_hhhh ______LLLL_IIII_BBBB_EEEE_LLLL_FFFF______XXXX_TTTT_NNNN_DDDD______6666_4444 defined. Applications which are built as 64-bit applications can ignore _LIBELF_XTND_64: it has no effect on them and 64-bit applications always link with -lelf never with -lelf_xtnd. PPPPaaaaggggeeee 2222